3.2471 \(\int \frac {(a+b x^n)^3}{x^3} \, dx\)

Optimal. Leaf size=72 \[ -\frac {a^3}{2 x^2}-\frac {3 a^2 b x^{n-2}}{2-n}-\frac {3 a b^2 x^{-2 (1-n)}}{2 (1-n)}-\frac {b^3 x^{3 n-2}}{2-3 n} \]

[Out]

-1/2*a^3/x^2-3/2*a*b^2/(1-n)/(x^(2-2*n))-3*a^2*b*x^(-2+n)/(2-n)-b^3*x^(-2+3*n)/(2-3*n)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {270} \[ -\frac {3 a^2 b x^{n-2}}{2-n}-\frac {a^3}{2 x^2}-\frac {3 a b^2 x^{-2 (1-n)}}{2 (1-n)}-\frac {b^3 x^{3 n-2}}{2-3 n} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x^n)^3/x^3,x]

[Out]

-a^3/(2*x^2) - (3*a*b^2)/(2*(1 - n)*x^(2*(1 - n))) - (3*a^2*b*x^(-2 + n))/(2 - n) - (b^3*x^(-2 + 3*n))/(2 - 3*
n)

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int \frac {\left (a+b x^n\right )^3}{x^3} \, dx &=\int \left (\frac {a^3}{x^3}+3 a^2 b x^{-3+n}+b^3 x^{3 (-1+n)}+3 a b^2 x^{-3+2 n}\right ) \, dx\\ &=-\frac {a^3}{2 x^2}-\frac {3 a b^2 x^{-2 (1-n)}}{2 (1-n)}-\frac {3 a^2 b x^{-2+n}}{2-n}-\frac {b^3 x^{-2+3 n}}{2-3 n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 60, normalized size = 0.83 \[ \frac {-a^3+\frac {6 a^2 b x^n}{n-2}+\frac {3 a b^2 x^{2 n}}{n-1}+\frac {2 b^3 x^{3 n}}{3 n-2}}{2 x^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^n)^3/x^3,x]

[Out]

(-a^3 + (6*a^2*b*x^n)/(-2 + n) + (3*a*b^2*x^(2*n))/(-1 + n) + (2*b^3*x^(3*n))/(-2 + 3*n))/(2*x^2)

________________________________________________________________________________________

fricas [B]  time = 0.67, size = 134, normalized size = 1.86 \[ -\frac {3 \, a^{3} n^{3} - 11 \, a^{3} n^{2} + 12 \, a^{3} n - 4 \, a^{3} - 2 \, {\left (b^{3} n^{2} - 3 \, b^{3} n + 2 \, b^{3}\right )} x^{3 \, n} - 3 \, {\left (3 \, a b^{2} n^{2} - 8 \, a b^{2} n + 4 \, a b^{2}\right )} x^{2 \, n} - 6 \, {\left (3 \, a^{2} b n^{2} - 5 \, a^{2} b n + 2 \, a^{2} b\right )} x^{n}}{2 \, {\left (3 \, n^{3} - 11 \, n^{2} + 12 \, n - 4\right )} x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)^3/x^3,x, algorithm="fricas")

[Out]

-1/2*(3*a^3*n^3 - 11*a^3*n^2 + 12*a^3*n - 4*a^3 - 2*(b^3*n^2 - 3*b^3*n + 2*b^3)*x^(3*n) - 3*(3*a*b^2*n^2 - 8*a
*b^2*n + 4*a*b^2)*x^(2*n) - 6*(3*a^2*b*n^2 - 5*a^2*b*n + 2*a^2*b)*x^n)/((3*n^3 - 11*n^2 + 12*n - 4)*x^2)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (b x^{n} + a\right )}^{3}}{x^{3}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)^3/x^3,x, algorithm="giac")

[Out]

integrate((b*x^n + a)^3/x^3, x)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 65, normalized size = 0.90 \[ \frac {3 a^{2} b \,x^{n}}{\left (n -2\right ) x^{2}}+\frac {3 a \,b^{2} x^{2 n}}{2 \left (n -1\right ) x^{2}}+\frac {b^{3} x^{3 n}}{\left (3 n -2\right ) x^{2}}-\frac {a^{3}}{2 x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*x^n)^3/x^3,x)

[Out]

-1/2*a^3/x^2+1/(3*n-2)*b^3/x^2*(x^n)^3+3/2/(n-1)*a*b^2/x^2*(x^n)^2+3/(n-2)*a^2*b/x^2*x^n

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)^3/x^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(n-3>0)', see `assume?` for mor
e details)Is n-3 equal to -1?

________________________________________________________________________________________

mupad [B]  time = 1.18, size = 66, normalized size = 0.92 \[ \frac {b^3\,x^{3\,n}}{x^2\,\left (3\,n-2\right )}-\frac {a^3}{2\,x^2}+\frac {3\,a\,b^2\,x^{2\,n}}{x^2\,\left (2\,n-2\right )}+\frac {3\,a^2\,b\,x^n}{x^2\,\left (n-2\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^n)^3/x^3,x)

[Out]

(b^3*x^(3*n))/(x^2*(3*n - 2)) - a^3/(2*x^2) + (3*a*b^2*x^(2*n))/(x^2*(2*n - 2)) + (3*a^2*b*x^n)/(x^2*(n - 2))

________________________________________________________________________________________

sympy [A]  time = 1.72, size = 627, normalized size = 8.71 \[ \begin {cases} - \frac {a^{3}}{2 x^{2}} - \frac {9 a^{2} b}{4 x^{\frac {4}{3}}} - \frac {9 a b^{2}}{2 x^{\frac {2}{3}}} + b^{3} \log {\relax (x )} & \text {for}\: n = \frac {2}{3} \\- \frac {a^{3}}{2 x^{2}} - \frac {3 a^{2} b}{x} + 3 a b^{2} \log {\relax (x )} + b^{3} x & \text {for}\: n = 1 \\- \frac {a^{3}}{2 x^{2}} + 3 a^{2} b \log {\relax (x )} + \frac {3 a b^{2} x^{2}}{2} + \frac {b^{3} x^{4}}{4} & \text {for}\: n = 2 \\- \frac {3 a^{3} n^{3}}{6 n^{3} x^{2} - 22 n^{2} x^{2} + 24 n x^{2} - 8 x^{2}} + \frac {11 a^{3} n^{2}}{6 n^{3} x^{2} - 22 n^{2} x^{2} + 24 n x^{2} - 8 x^{2}} - \frac {12 a^{3} n}{6 n^{3} x^{2} - 22 n^{2} x^{2} + 24 n x^{2} - 8 x^{2}} + \frac {4 a^{3}}{6 n^{3} x^{2} - 22 n^{2} x^{2} + 24 n x^{2} - 8 x^{2}} + \frac {18 a^{2} b n^{2} x^{n}}{6 n^{3} x^{2} - 22 n^{2} x^{2} + 24 n x^{2} - 8 x^{2}} - \frac {30 a^{2} b n x^{n}}{6 n^{3} x^{2} - 22 n^{2} x^{2} + 24 n x^{2} - 8 x^{2}} + \frac {12 a^{2} b x^{n}}{6 n^{3} x^{2} - 22 n^{2} x^{2} + 24 n x^{2} - 8 x^{2}} + \frac {9 a b^{2} n^{2} x^{2 n}}{6 n^{3} x^{2} - 22 n^{2} x^{2} + 24 n x^{2} - 8 x^{2}} - \frac {24 a b^{2} n x^{2 n}}{6 n^{3} x^{2} - 22 n^{2} x^{2} + 24 n x^{2} - 8 x^{2}} + \frac {12 a b^{2} x^{2 n}}{6 n^{3} x^{2} - 22 n^{2} x^{2} + 24 n x^{2} - 8 x^{2}} + \frac {2 b^{3} n^{2} x^{3 n}}{6 n^{3} x^{2} - 22 n^{2} x^{2} + 24 n x^{2} - 8 x^{2}} - \frac {6 b^{3} n x^{3 n}}{6 n^{3} x^{2} - 22 n^{2} x^{2} + 24 n x^{2} - 8 x^{2}} + \frac {4 b^{3} x^{3 n}}{6 n^{3} x^{2} - 22 n^{2} x^{2} + 24 n x^{2} - 8 x^{2}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x**n)**3/x**3,x)

[Out]

Piecewise((-a**3/(2*x**2) - 9*a**2*b/(4*x**(4/3)) - 9*a*b**2/(2*x**(2/3)) + b**3*log(x), Eq(n, 2/3)), (-a**3/(
2*x**2) - 3*a**2*b/x + 3*a*b**2*log(x) + b**3*x, Eq(n, 1)), (-a**3/(2*x**2) + 3*a**2*b*log(x) + 3*a*b**2*x**2/
2 + b**3*x**4/4, Eq(n, 2)), (-3*a**3*n**3/(6*n**3*x**2 - 22*n**2*x**2 + 24*n*x**2 - 8*x**2) + 11*a**3*n**2/(6*
n**3*x**2 - 22*n**2*x**2 + 24*n*x**2 - 8*x**2) - 12*a**3*n/(6*n**3*x**2 - 22*n**2*x**2 + 24*n*x**2 - 8*x**2) +
 4*a**3/(6*n**3*x**2 - 22*n**2*x**2 + 24*n*x**2 - 8*x**2) + 18*a**2*b*n**2*x**n/(6*n**3*x**2 - 22*n**2*x**2 +
24*n*x**2 - 8*x**2) - 30*a**2*b*n*x**n/(6*n**3*x**2 - 22*n**2*x**2 + 24*n*x**2 - 8*x**2) + 12*a**2*b*x**n/(6*n
**3*x**2 - 22*n**2*x**2 + 24*n*x**2 - 8*x**2) + 9*a*b**2*n**2*x**(2*n)/(6*n**3*x**2 - 22*n**2*x**2 + 24*n*x**2
 - 8*x**2) - 24*a*b**2*n*x**(2*n)/(6*n**3*x**2 - 22*n**2*x**2 + 24*n*x**2 - 8*x**2) + 12*a*b**2*x**(2*n)/(6*n*
*3*x**2 - 22*n**2*x**2 + 24*n*x**2 - 8*x**2) + 2*b**3*n**2*x**(3*n)/(6*n**3*x**2 - 22*n**2*x**2 + 24*n*x**2 -
8*x**2) - 6*b**3*n*x**(3*n)/(6*n**3*x**2 - 22*n**2*x**2 + 24*n*x**2 - 8*x**2) + 4*b**3*x**(3*n)/(6*n**3*x**2 -
 22*n**2*x**2 + 24*n*x**2 - 8*x**2), True))

________________________________________________________________________________________